import { createRouter, createWebHistory } from 'vue-router'
import home from '../views/home.vue'
import zidian from '@/views/zidian.vue'

import shouye from '@/views/shouye.vue'
// 广告列表
import AdvertisingList from '@/views/advertisement/AdvertisingList.vue'

//套装分类
import CommodityList from '@/components/taozhuang/commodityList.vue'
import Sahngpin from '@/components/taozhuang/sahngpin.vue'

//商品分类
import shangpinfen from '../components/shangpin/shangpinfen.vue'
import shang from '../components/shangpin/shang.vue'
import pinglun from '../components/shangpin/pinglun.vue'
import sku from '@/components/shangpin/sku.vue'

// 用户管理
import yonghu from '@/components/yonghu/yonghu.vue'
//用户类表
import yonghuList from '@/components/yonghu/yonghuList.vue'

//订单列表
import dingdanList from '@/components/dingdan/dingdanList.vue'
//订单
import dingdan from '@/components/dingdan/dingdan.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: home,
      children: [
        {
          path: '/shouye',
          name: 'shouye',
          meta:{
            title:'首页'
          },
          component: shouye,
        },
        {
          path: '/zidian',
          name: 'zidian',
          meta:{
            title:'字典管理'
          },
          component: zidian,
        },
        {
          path: '/yonghu',
          name: 'yonghu',
          meta:{
            title:'用户管理'
          },
          component: yonghu,
        },
        {
          path: '/AdvertisingList',
          name: 'AdvertisingList',
          meta:{
            title:'广告列表'
          },

          component: AdvertisingList,
        },
        {
          path: '/CommodityList',
          name: 'CommodityList',
          meta:{
            title:'套装分类'
          },

          component: CommodityList,
        },
        {
          path: '/Sahngpin',
          name: 'Sahngpin',
          meta:{
            title:'套装商品'
          },

          component: Sahngpin,
        },
        {
          path: '/shangpinfen',
          name: 'shangpinfen',
          meta:{
            title:'商品分类'
          },

          component: shangpinfen,
        },
        {
          path: '/shang',
          name: 'shang',
          meta:{
            title:'商品'
          },

          component: shang,
        },
        {
          path: '/pinglun',
          name: 'pinglun',
          meta:{
            title:'评论'
          },

          component: pinglun,
        },
        {
          path: '/yonghuList',
          name: 'yonghuList',
          meta:{
            title:'用户类表'
          },

          component: yonghuList,
        },
        {
          path: '/dingdanList',
          name: 'dingdanList',
          meta:{
            title:'订单类表'
          },

          component: dingdanList,
        },
        {
          path: '/dingdan',
          name: 'dingdan',
          meta:{
            title:'退货订单'
          },

          component: dingdan,
        },
        {
          path: '/sku',
          name: 'sku',
          meta:{
            title:'sku设置'
          },

          component: sku,
        },



      ]
    }
  
  ]
})

export default router
